<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel app\models\search\Config */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '升级配置信息';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="config-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <?= $this->render('_search', ['model' => $searchModel]); ?>

    <div class="col-md-12 col-sm-12 col-lg-10">
    <p>
        <?= Html::a('创建 Config', ['create'], ['class' => 'btn btn-success']) ?>
    </p>
    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'columns' => [
            'key',
            'value:ntext',
            [
                'label'=>'编辑',
                'format'=>'raw',
                'attribute'=>'编辑',
                'value' => function($model){
                    return Html::a('编辑',['/admin/config/update','id'=>$model->key],['class'=>'btn btn-link']);
                }
            ],
        ],
    ]); ?>
    </div>
</div>
